package chapter03.Example12;
    class Student {
        String name;
        {
            System.out.println("我是构造代码块");
        }
        // 构造方法
        public Student () {
            System.out.println("我是Student类的构造方法");
        }
    }
public class Example12 {
        public static void main (String[] args) {
            Student stu1 = new Student();
            Student stu2 = new Student();
        }
}

